//
//  ViewController.m
//  Nav
//
//  Created by dingzhibing on 2017/11/8.
//  Copyright © 2017年 dingzhibing. All rights reserved.
//

#import "ViewController.h"

#import "FirstViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"测试";
    self.view.backgroundColor = [UIColor yellowColor];
    
    UIBarButtonItem *rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"下一页" style:UIBarButtonItemStylePlain target:self action:@selector(showNextPage)];
    
    self.navigationItem.rightBarButtonItem = rightBarButtonItem;
}

- (void)showNextPage {
    FirstViewController *firstVC = [[FirstViewController alloc] init];
    firstVC.title = @"第一页";
    [self.navigationController pushViewController:firstVC animated:YES];
}

@end
